﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using SignalProcessing;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SignalProcessingTests
{
    [TestClass]
    public class FourierFixture
    {
        [TestMethod]
        public void CanDoFourier()
        {
            var data = new Dictionary<Double, Double>();
            for (int i = 0; i < 1000; i++)
            {
                data.Add(i / 220.0, Math.Sin(i / 5.0));
            }

            var timeDelta = 1.0 / 220.0;
            Double frequency, maxAmplitude;
            var fourier = Fourier.FourierTransform(data.Values.ToArray(), timeDelta, out frequency, out maxAmplitude);
        }
    }
}
